package sctu.edu.java.year2016.team01.xuhanmei.day20160529.KnowDuoTai;

/**
 * Created by Administrator on 2016/5/29.
 */

import java.util.Objects;
import java.util.Scanner;

public class Customer {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入想购买的车型,BMW或者Benz");


        String c = scan.nextLine();


        if (Objects.equals(c, "BMW")) {
            System.out.println("顾客要买BMW");
            Car bmw = CarFactory.getCar("BMW");
            System.out.println("提取汽车：" + bmw.getinfo());
        } else if (Objects.equals(c, "Benz")) {
            System.out.println("顾客要买Benz：");
            Car benz = CarFactory.getCar("Benz");
            System.out.println("提取汽车：" + benz.getinfo());
        }
    }
}
